-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Persistence] First Implementation of the StateHash (#284) #285
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Quick CI change]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 sweet green them test results
Description
The first implementation of the
Issue
Fixes #284 with follow up work in #361.
Type of change
Please mark the relevant option(s):
List of changes
Persistence - Core Changes for SMT
block_persistence.proto
Commit
, prepare and store a persistence block in the KV Store, SQL StoreIndexTransactions
(plural) toIndexTransaction
(singular)ComputeStateHash
to update the global state based on:params
andflags
Persistence - General module changes
GetAccountsUpdated
,GetPoolsUpdated
andGetActorsUpdated
functionsGetPrevAppHash
andindexTransactions
functionsblockProtoBytes
andtxResults
from the local state and addedquorumCert
resetContext
related operations into a single functionReleaseWriteContext
ClearAllState
andResetToGenesis
for debugging & testing purposesPersistence - KVStore changes
Put
toSet
smt.MapStore
in the interface containingGet
,Set
andDelete
Delete
GetAll
to return bothkeys
andvalues
Persistence - Module Interface changes
GetPrevHash
and just usingGetBlockHash
insteadblockProtoBz
fromSetProposalBlock
interfaceGetLatestBlockTxs
andSetLatestTxResults
in exchange forIndexTransaction
SetTxResults
UpdateAppHash
toComputeStateHash
GetBlockTxs
,GetBlockHash
, etc…)Consensus
highPrepareQC
if available to the block being createdblockProtoBytes
from propagation inSetProposalBlock
writeContext
is released when refreshing theutilityContext
GetBlockHash(height)
instead ofGetPrevAppHash
to be more explicitquorumCert
when preparing a new blockConfigs
trees_store_dir
to persistence configsLocalNet
configs to have an emptytx_indexer_path
andtrees_store_dir
Makefile changes
db_cli_node
db_show_schemas
test_persistence_state_hash
benchmark_persistence_state_hash
Debug
ResetToGenesis
- Added the ability to reset the state to genesisClearState
- Added the ability to clear the state completely (height 0 without genesis data)Testing
New:
make benchmark_persistence_state_hash
make test_persistence_state_hash
Existing:
make develop_test
README
Required Checklist
If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)